{% extends 'father.html' %}

{% block btn %}
    <a href="/dept/add/" class="btn btn-primary">新建部门</a>
{% endblock %}

{% block main %}
    <table class="table">
        <thead>
        <tr>
            <th scope="col">部门编号</th>
            <th scope="col">部门名称</th>
            <th scope="col">操作</th>

        </tr>
        </thead>
        <tbody>
        {% for dept in queryset %}
            <tr>
                <td>{{ dept.id }}</td>
                <td>{{ dept.title }}</td>
                <td>
                    <a href="/dept/{{ dept.id }}/update/" class="btn btn-success">修改</a>
                    <a href="/dept/{{ dept.id }}/delete/" class="btn btn-danger">删除</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
